/*
 * @Descripttion: 智能柜管理接口
 * @version:
 * @Author: 李越
 * @Date: 2023-03-02 11:00:13
 */

import api from './index'
import config from "@/config"

// 智能柜列表
export const smartCabinetList = params => {
	const url = `${config.pre}/supplier/smartCabinetAdmin/list?pageNum=${params.pageNum}&pageSize=${params.pageSize}`;
	return api.post(url, params)
}

// 根据id获取智能柜
export const smartCabinetId = id => {
	const url = `${config.pre}/supplier/smartCabinetAdmin/${id}`;
	return api.get(url)
}

// 更新智能柜
export const smartCabinetUpdate = data => {
	const url = `${config.pre}/supplier/smartCabinetAdmin/${data.id}`;
	return api.post(url, data)
}

// 更新智能柜状态
export const smartCabinetUpdateStatus = data => {
	const url = `${config.pre}/supplier/smartCabinetAdmin/status/${data.id}`;
	return api.post(url, data)
}

// 新增智能柜
export const smartCabinetAdd = data => {
	const url = `${config.pre}/supplier/smartCabinetAdmin/${data.id}`;
	return api.post(url, data)
}

// 智能柜状态
export const smartCabinetState = id => {
	const url = `${config.pre}/supplier/smartCabinetAdmin/status`;
	return api.get(url)
}

// 智能用户列表
export const smartCabinetAuthList= params => {
	const url = `${config.pre}/supplier/smartCabinetAuth/list?pageNum=${params.pageNum}&pageSize=${params.pageSize}`;
	return api.post(url, params)
}

// 智能用户列表
export const smartCabinetAuthRemove= id => {
	const url = `${config.pre}/supplier/smartCabinetAuth/${id}`;
	return api.delete(url)
}

// 智能用户列表
export const smartCabinetAuthAdd= params => {
	const url = `${config.pre}/supplier/smartCabinetAuth/add`;
	return api.post(url, params)
}



